package com.project.bookstore.category.service;

import com.project.bookstore.category.domain.Category;
import com.baomidou.mybatisplus.extension.service.IService;
import com.project.bookstore.category.pojo.CategoryIndexVO;
import com.project.bookstore.category.pojo.CategoryRelatedVO;
import com.project.bookstore.common.CommonResult;

import java.util.List;

/**
* @author 12603
* @description 针对表【t_category(类别)】的数据库操作Service
* @createDate 2022-05-13 13:37:16
*/
public interface CategoryService extends IService<Category> {

    /**
     * 获取首页类别导航数据
     * @return CommonResult<CategoryIndexVO[]>
     */
    CommonResult<List<CategoryIndexVO>> getCategoryForIndex();

    /**
     * 图书详情页相关分类
     * @param classifyId 该图书的类别id
     * @return 该图书分类的兄弟分类
     */
    CommonResult<List<CategoryRelatedVO>> getRelatedClassify(Long classifyId);

    /**
     * 通过类别数组批量查询相关书籍
     * @return
     */
    Long[] getRelatedClassifyIds(Long parentId);
}
